With traditional file system kernels, to delete a directory a user must first traverse the entire directory and delete files and subdirectories from the bottom up, starting with the leafs (or leaves). Only when all of the contents of the parent directory have been manually deleted can the parent directory be deleted, for example using the UNIX command rmdir. The remove directory command, rmdir directory_name, will only remove an empty directory. There is a UNIX command that will remove a directory and all of the contents of the directory, however, these commands require the user specify the entire directory tree. In addition, the operating system that is interpreting the command must still communicate with the file system to do the directory tree tracing from the top down, and removal of the leafs from bottom-up, which incurs a lot of communication overhead. Other equivalent commands for deleting an entire tree for other operating systems exist, but in all of these alternatives deletion occurs from bottom-up through the tree after the directory tree is first traced from top-down. Each subdirectory is only deleted after it is emptied. Deletion of the top directory must wait until all subdirectories below it have been emptied. The above mechanisms while arguably suitable for hard disk drives, are not optimized for solid-state media.
Solid-state memory, such as flash, is currently in use in solid-state drives (SSD) to augment or replace conventional hard disk drives (HDD), writable CD (compact disk) or writable DVD (digital versatile disk) drives, collectively known as spinning media, and tape drives, for storage of large amounts of data. Flash and other solid-state memories have characteristics that differ from spinning media. Yet, many solid-state drives are designed to conform to hard disk drive standards for compatibility reasons, which makes it difficult to provide enhanced features or take advantage of unique aspects of flash and other solid-state memory. It is within this context that the embodiments arise.